Skip to content

Conversation

@rozza
Copy link
Member

@rozza rozza commented Aug 5, 2021

@rozza rozza self-assigned this Aug 5, 2021
}
}

task testSlowGroovy(type: Test) {
Copy link
Member Author

@rozza rozza Aug 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to create a custom task just for the groovy tests and that fixes the issue ?!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thats's what seem to be suggested as the solution, which is unfortunate: spockframework/spock#1288 (comment).

}

task testSlowOnly(type: Test) {
dependsOn('testSlowGroovy')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the spock test dependency

import static com.mongodb.ClusterFixture.getSslSettings
import static com.mongodb.internal.connection.CommandHelper.executeCommand

@IgnoreIf({ System.getProperty('ignoreSlowUnitTests') == 'true' })
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a legacy system property

def 'should throw a MongoSocketOpenException when the AsynchronousSocket Stream fails to open'() {
given:
def connection = new InternalStreamConnectionFactory(
def connection = new InternalStreamConnectionFactory(ClusterConnectionMode.SINGLE,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are just to bring the code up to date.


then: 'it prunes the existing connections and again ensures the minimum size of the pool'
connectionFactory.createdConnections.size() == 10
connectionFactory.createdConnections.size() == 5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a test bug.

class ClientSideEncryptionBsonSizeLimitsSpecification extends FunctionalSpecification {

private final String collectionName = 'ClientSideEncryptionBsonSizeLimitsSpecification'
private final String collName = 'ClientSideEncryptionBsonSizeLimitsSpecification'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side effect of Spock dependency update? Theres a getCollectionName method in the FunctionalSpecification and spock complained they clashed.

@rozza rozza requested review from jyemin and stIncMale August 5, 2021 15:22
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you @rozza! 💪

}
}

task testSlowGroovy(type: Test) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thats's what seem to be suggested as the solution, which is unfortunate: spockframework/spock#1288 (comment).

Copy link
Collaborator

@jyemin jyemin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rozza rozza merged commit fb6388c into mongodb:master Aug 10, 2021
@rozza rozza deleted the JAVA-4145 branch August 10, 2021 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants